package com.coolw.dynamic.thread.pool.task;

import com.coolw.dynamic.thread.pool.service.ThreadPoolStatService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * 线程池监控统计
 *
 * @author coolw
 * @date 2024/5/17 17:06
 */
@Component
public class MonitorTask {

    @Autowired
    private ThreadPoolStatService statService;

    @Scheduled(cron = "0 0/5 * * * ?")
    public void execute() {
        statService.execute();
    }
}
